package wx.themes
{
	import flash.display.DisplayObject;
	import flash.geom.Rectangle;
	
	import wx.display.ScaleBitmapSprite;
	import wx.utils.ColorUtil;
	import wx.core.ITheme;

	/**
	 * 
	 * @author wujianqi
	 * 
	 * DPI 160   主题皮肤
	 * 
	 */	
	public class Theme160dpi implements ITheme
	{
		
		public function Theme160dpi()
		{
		}		
		
		/**
		 * 系统文本
		 */
		public function get smallFontColor():uint{ //字体颜色
			return 0x000000;
		}
		public function get smallFontSize():int{ //字体大小
			return 12;
		}
		public function get mediumFontColor():uint{ 
			return 0x000000;
		}
		public function get mediumFontSize():int{
			return 18;
		}
		public function get largeFontColor():uint{
			return 0xFFFFFF;
		}
		public function get largeFontSize():int{
			return 24;
		}

		/**
		 *按钮控件
		 */	
		[Embed(source="/assets/dpi160/btn_normal.png")]
		private const _buttonUpSkin:Class;
		[Embed(source="/assets/dpi160/btn_down.png")]
		private const _buttonDownSkin:Class;
		private const _buttonScale9Grid:Rectangle = new Rectangle(10,10,40,16);
		public function get buttonUpSkin():DisplayObject{ //弹起	
			return new ScaleBitmapSprite(new _buttonUpSkin,_buttonScale9Grid,68,50);
		}
		public function get buttonDownSkin():DisplayObject{	//按下						
			return new ScaleBitmapSprite(new _buttonDownSkin,_buttonScale9Grid,68,50);
		}
		public function get buttonHoverSkin():DisplayObject{ //停留
			return ColorUtil.hover(buttonUpSkin);
		}
		public function get buttonDisableSkin():DisplayObject{ //禁用
			return ColorUtil.disable(buttonUpSkin);
		}
		public function get buttonLabelOffset():Object{ //标签偏移
			return {top:10,left:12};
		}
		
		
		/**
		 *文本输入控件
		 */	
		[Embed(source="/assets/dpi160/input_normal.png")]
		private const _inputNormalSkin:Class;
		[Embed(source="/assets/dpi160/input_focus.png")]
		private const _inputFocusInSkin:Class;
		private const _inputScale9Grid:Rectangle = new Rectangle(6,6,56,26);
		public function get inputNormalSkin():DisplayObject{ //正常	
			return new ScaleBitmapSprite(new _inputNormalSkin,_inputScale9Grid,128,36);
		}
		public function get inputHoverSkin():DisplayObject{ //停留	
			return ColorUtil.hover(inputNormalSkin);
		}
		public function get inputFocusInSkin():DisplayObject{ //触发焦点
			return new ScaleBitmapSprite(new _inputFocusInSkin,_inputScale9Grid,128,36);
		}
		public function get inputDisableSkin():DisplayObject{ //禁用
			return ColorUtil.disable(inputNormalSkin);
		}
		public function get inputFocusOffset():Object{ //输入焦点范围
			return {top:6,left:3,right:3,bottom:3};
		}
		
		/**
		 *切换按钮控件
		 */		
		//private const toggleSwitchOnSkin:Class;
		//private const toggleSwitchOffSkin:Class;
		
		/**
		 *单选 
		 */	
		[Embed(source="/assets/dpi160/radio_normal.png")]
		private const _radioButtonNormalSkin:Class;
		[Embed(source="/assets/dpi160/radio_checked.png")]
		private const _radioButtonSelectedSkin:Class;
		
		public function get radioNormalSkin():DisplayObject{
			return new _radioButtonNormalSkin;
		}		
		public function get radioHoverSkin():DisplayObject{
			return ColorUtil.hover(radioNormalSkin);
		}
		public function get radioDownSkin():DisplayObject{
			return ColorUtil.deepening(radioNormalSkin);
		}
		public function get radioSelectedSkin():DisplayObject{
			return new _radioButtonSelectedSkin;
		}
		public function get radioSelectedHoverSkin():DisplayObject{
			return ColorUtil.hover(radioSelectedSkin);
		}
		public function get radioDisableSkin():DisplayObject{
			return ColorUtil.disable(radioNormalSkin);;
		}
		
		/**
		 *复选 
		 */	
		[Embed(source="/assets/dpi160/checkbox_normal.png")]
		private const _checkboxNormalSkin:Class;
		[Embed(source="/assets/dpi160/checkbox_checked.png")]
		private const _checkboxSelectedSkin:Class;		
		public function get checkboxNormalSkin():DisplayObject{
			return new _checkboxNormalSkin;
		}		
		public function get checkboxHoverSkin():DisplayObject{
			return ColorUtil.hover(checkboxNormalSkin);
		}
		public function get checkboxDownSkin():DisplayObject{
			return ColorUtil.deepening(checkboxHoverSkin);
		}
		public function get checkboxSelectedSkin():DisplayObject{
			return new _checkboxSelectedSkin;
		}
		public function get checkboxSelectedHoverSkin():DisplayObject{
			return ColorUtil.hover(checkboxSelectedSkin);
		}
		public function get checkboxDisableSkin():DisplayObject{
			return ColorUtil.disable(checkboxNormalSkin);
		}
		
		/**
		 *滑块 
		 */		
		[Embed(source="/assets/dpi160/slider_normal.png")]
		private const _slideTrackBgSkin:Class;
		[Embed(source="/assets/dpi160/slider_light.png")]
		private const _slideTrackOnSkin:Class;
		[Embed(source="/assets/dpi160/slider_btn.png")]
		private const _slideTrackBtnSkin:Class;
		private const _slideScale9Grid:Rectangle = new Rectangle(4,4,136,2);
		public function get slideTrackBgSkin():DisplayObject{
			return new ScaleBitmapSprite(new _slideTrackBgSkin,_slideScale9Grid,150,10);
		}
		public function get slideTrackOnSkin():DisplayObject{
			return new ScaleBitmapSprite(new _slideTrackOnSkin,_slideScale9Grid,150,10);;
		}
		public function get sliderButtonSkin():DisplayObject{
			return new _slideTrackBtnSkin;
		}
		public function get sliderButtonHoverSkin():DisplayObject{
			return ColorUtil.hover(sliderButtonSkin);
		}
		public function get sliderButtonDownSkin():DisplayObject{
			return ColorUtil.deepening(sliderButtonSkin);
		}
		
		/**
		 * 横向\纵向  滚动条
		 */		
		[Embed(source="/assets/dpi160/h_scrollerbar.png")]
		private const _horizontalScrollerBarSkin:Class;
		[Embed(source="/assets/dpi160/v_scrollerbar.png")]
		private const _verticalScrollerBarSkin:Class;
		public function get horizontalScrollerBarSkin():DisplayObject{
			return new ScaleBitmapSprite(new _horizontalScrollerBarSkin,new Rectangle(4,4,44,2),54,10);
		}
		public function get verticalScrollerBarSkin():DisplayObject{
			return new ScaleBitmapSprite(new _verticalScrollerBarSkin,new Rectangle(4,4,2,44),10,54);
		}
		
		/**
		 *弹出窗 
		 */		
		//private const dialogSkin:Class;
		//private const dialogTitleSkin:Class;
		
		/**
		 *提示框 
		 */		
		//private const toastSkin:Class;
		
		/**
		 *顶部导航 
		 */	
		[Embed(source="/assets/dpi160/actionbar_bg.png")]
		private const _actionBarSkin:Class; 
		public function get actionBarSkin():DisplayObject{
			return new ScaleBitmapSprite(new _actionBarSkin,new Rectangle(60,12,180,42),300,54);
		}

	
				
		
	}
}